<?php

/**
 * GestdentPaciente form base class.
 *
 * @package    gestdent
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseGestdentPacienteForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'               => new sfWidgetFormInputHidden(),
      'rut'              => new sfWidgetFormInput(),
      'apellido_paterno' => new sfWidgetFormInput(),
      'apellido_materno' => new sfWidgetFormInput(),
      'nombres'          => new sfWidgetFormInput(),
      'direccion'        => new sfWidgetFormInput(),
      'telefono'         => new sfWidgetFormInput(),
      'fecha_nacimiento' => new sfWidgetFormDateTime(),
      'created_at'       => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'               => new sfValidatorPropelChoice(array('model' => 'GestdentPaciente', 'column' => 'id', 'required' => false)),
      'rut'              => new sfValidatorString(array('max_length' => 10, 'required' => false)),
      'apellido_paterno' => new sfValidatorString(array('max_length' => 255)),
      'apellido_materno' => new sfValidatorString(array('max_length' => 255)),
      'nombres'          => new sfValidatorString(array('max_length' => 255)),
      'direccion'        => new sfValidatorString(array('max_length' => 255)),
      'telefono'         => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'fecha_nacimiento' => new sfValidatorDateTime(),
      'created_at'       => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('gestdent_paciente[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'GestdentPaciente';
  }


}
